﻿@using com.hyrentals.webcommon.extensions
@using com.hyrentals.webportal.Config

@{
    Html.AddStyle("css/auth");
    Html.AddTailScript("js/signup");
    string firstName = ViewBag.FirstName;
    string lastName = ViewBag.Lastname;
    string email = ViewBag.Email;
}

<div class="layout-primary reg">
    <div class="layout-primary-left"></div>
    <div class="layout-primary-middle">
        <div class="reg-region">
            <p class="title">Sign up</p>
            <form id="reg_frm" class="auth-form" action="/account/signup" method="post">
             @{
                string summaryMsg = Html.GetValidationMessage("reg_summary");
                if (summaryMsg != null)
                {
                    <div class="valid-summary">
                        <p class="estate error">
                            <span class="label">@summaryMsg</span>
                        </p>
                    </div>
                }
            }
           <ul class="valid-simple">
                @* first name *@
                <li class="field">
                @{
                    string firstnameMsg = Html.GetValidationMessage("reg_firstname");
                    if (firstnameMsg == null)
                    {
                        <p id="msg_firstname" style="display: none;"></p>
                    }
                    else
                    {
                        <p id="msg_firstname">@firstnameMsg</p>
                    }
                }
                <div class="clearfix">
                    <label class="field-name" for="reg_firstname">First name</label>
                    <input id="reg_firstname" class="input-text" type="text" name="firstName" value="@firstName" data-msgbox="#msg_firstname" autocomplete="off" tabindex="1"/>
                 </div>
                </li>
                @* last name *@
                 <li class="field">
                @{
                    string lastnameMsg = Html.GetValidationMessage("reg_lastname");
                    if (lastnameMsg == null)
                    {
                        <p id="msg_lastname" style="display: none;"></p>
                    }
                    else
                    {
                        <p id="msg_lastname">@lastnameMsg</p>
                    }
                }
                <div class="clearfix">
                    <label class="field-name" for="reg_lastname">Last name</label>
                    <input id="reg_lastname" class="input-text" type="text" name="lastName" value="@lastName" data-msgbox="#msg_lastname" autocomplete="off" tabindex="2"/>
                 </div>
                </li>

                @* email *@
                 <li class="field">
                @{
                    string emailMsg = Html.GetValidationMessage("reg_email");
                    if (emailMsg == null)
                    {
                        <p id="msg_email" style="display: none;"></p>
                    }
                    else
                    {
                        <p id="msg_email">@emailMsg</p>
                    }
                }
                <div class="clearfix">
                    <label class="field-name" for="reg_email">Email Address</label>
                    <input id="reg_email" class="input-text" type="text" name="email" value="@email" data-msgbox="#msg_email" autocomplete="off" tabindex="3"/>
                 </div>
                </li>

                @* password *@
                <li class="field"">
                 @{
                    string pwdMsg = Html.GetValidationMessage("reg_pwd");
                    if (pwdMsg == null)
                    {
                        <p id="msg_pwd" style="display: none;"></p>
                    }
                    else
                    {
                        <p id="msg_pwd" style="display: none;">@pwdMsg</p>
                    }
                        
                }
                <div class="clearfix">
                    <label class="field-name" for="reg_pwd">Password</label>
                    <input id="reg_pwd" class="input-text" type="password" name="Password" data-msgbox="#msg_pwd" autocomplete="off" tabindex="4"/>
                </div>
                </li>
                <li class="submit-field">
                    <button class="btn btn-large btn-block" type="submit" tabindex="5">Sign up</button>
                </li>
            </ul>
        </form>
            <p class="tip">Already an HYRentals member?<a href="/account/login">Log in</a></p>
        </div>
    </div>
    <div class="layout-primary-right">
    </div>
</div>